3.175 \(\int (g \sec (e+f x))^p (a+a \sec (e+f x)) (c-c \sec (e+f x)) \, dx\)

Optimal. Leaf size=65 \[ -\frac {a c \tan ^3(e+f x) \cos ^2(e+f x)^{\frac {p+3}{2}} (g \sec (e+f x))^p \, _2F_1\left (\frac {3}{2},\frac {p+3}{2};\frac {5}{2};\sin ^2(e+f x)\right )}{3 f} \]

[Out]

-1/3*a*c*(cos(f*x+e)^2)^(3/2+1/2*p)*hypergeom([3/2, 3/2+1/2*p],[5/2],sin(f*x+e)^2)*(g*sec(f*x+e))^p*tan(f*x+e)
^3/f

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {3962, 2617} \[ -\frac {a c \tan ^3(e+f x) \cos ^2(e+f x)^{\frac {p+3}{2}} (g \sec (e+f x))^p \, _2F_1\left (\frac {3}{2},\frac {p+3}{2};\frac {5}{2};\sin ^2(e+f x)\right )}{3 f} \]

Antiderivative was successfully verified.

[In]

Int[(g*Sec[e + f*x])^p*(a + a*Sec[e + f*x])*(c - c*Sec[e + f*x]),x]

[Out]

-(a*c*(Cos[e + f*x]^2)^((3 + p)/2)*Hypergeometric2F1[3/2, (3 + p)/2, 5/2, Sin[e + f*x]^2]*(g*Sec[e + f*x])^p*T
an[e + f*x]^3)/(3*f)

Rule 2617

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[((a*Sec[e +
f*x])^m*(b*Tan[e + f*x])^(n + 1)*(Cos[e + f*x]^2)^((m + n + 1)/2)*Hypergeometric2F1[(n + 1)/2, (m + n + 1)/2,
(n + 3)/2, Sin[e + f*x]^2])/(b*f*(n + 1)), x] /; FreeQ[{a, b, e, f, m, n}, x] &&  !IntegerQ[(n - 1)/2] &&  !In
tegerQ[m/2]

Rule 3962

Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)
]*(d_.) + (c_))^(n_.), x_Symbol] :> Dist[(-(a*c))^m, Int[ExpandTrig[(g*csc[e + f*x])^p*cot[e + f*x]^(2*m), (c
+ d*csc[e + f*x])^(n - m), x], x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2
 - b^2, 0] && IntegersQ[m, n] && GeQ[n - m, 0] && GtQ[m*n, 0]

Rubi steps

\begin {align*} \int (g \sec (e+f x))^p (a+a \sec (e+f x)) (c-c \sec (e+f x)) \, dx &=-\left ((a c) \int (g \sec (e+f x))^p \tan ^2(e+f x) \, dx\right )\\ &=-\frac {a c \cos ^2(e+f x)^{\frac {3+p}{2}} \, _2F_1\left (\frac {3}{2},\frac {3+p}{2};\frac {5}{2};\sin ^2(e+f x)\right ) (g \sec (e+f x))^p \tan ^3(e+f x)}{3 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.33, size = 72, normalized size = 1.11 \[ -\frac {a c \tan (e+f x) (g \sec (e+f x))^p \left (\frac {\, _2F_1\left (\frac {1}{2},\frac {p}{2};\frac {p+2}{2};\sec ^2(e+f x)\right )}{\sqrt {-\tan ^2(e+f x)}}+p\right )}{f p (p+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(g*Sec[e + f*x])^p*(a + a*Sec[e + f*x])*(c - c*Sec[e + f*x]),x]

[Out]

-((a*c*(g*Sec[e + f*x])^p*Tan[e + f*x]*(p + Hypergeometric2F1[1/2, p/2, (2 + p)/2, Sec[e + f*x]^2]/Sqrt[-Tan[e
 + f*x]^2]))/(f*p*(1 + p)))

________________________________________________________________________________________

fricas [F]  time = 0.44, size = 0, normalized size = 0.00 \[ {\rm integral}\left (-{\left (a c \sec \left (f x + e\right )^{2} - a c\right )} \left (g \sec \left (f x + e\right )\right )^{p}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*sec(f*x+e))^p*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x, algorithm="fricas")

[Out]

integral(-(a*c*sec(f*x + e)^2 - a*c)*(g*sec(f*x + e))^p, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int -{\left (a \sec \left (f x + e\right ) + a\right )} {\left (c \sec \left (f x + e\right ) - c\right )} \left (g \sec \left (f x + e\right )\right )^{p}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*sec(f*x+e))^p*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x, algorithm="giac")

[Out]

integrate(-(a*sec(f*x + e) + a)*(c*sec(f*x + e) - c)*(g*sec(f*x + e))^p, x)

________________________________________________________________________________________

maple [F]  time = 2.62, size = 0, normalized size = 0.00 \[ \int \left (g \sec \left (f x +e \right )\right )^{p} \left (a +a \sec \left (f x +e \right )\right ) \left (c -c \sec \left (f x +e \right )\right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*sec(f*x+e))^p*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x)

[Out]

int((g*sec(f*x+e))^p*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ -\int {\left (a \sec \left (f x + e\right ) + a\right )} {\left (c \sec \left (f x + e\right ) - c\right )} \left (g \sec \left (f x + e\right )\right )^{p}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*sec(f*x+e))^p*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x, algorithm="maxima")

[Out]

-integrate((a*sec(f*x + e) + a)*(c*sec(f*x + e) - c)*(g*sec(f*x + e))^p, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )\,\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )\,{\left (\frac {g}{\cos \left (e+f\,x\right )}\right )}^p \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a/cos(e + f*x))*(c - c/cos(e + f*x))*(g/cos(e + f*x))^p,x)

[Out]

int((a + a/cos(e + f*x))*(c - c/cos(e + f*x))*(g/cos(e + f*x))^p, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ - a c \left (\int \left (- \left (g \sec {\left (e + f x \right )}\right )^{p}\right )\, dx + \int \left (g \sec {\left (e + f x \right )}\right )^{p} \sec ^{2}{\left (e + f x \right )}\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*sec(f*x+e))**p*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x)

[Out]

-a*c*(Integral(-(g*sec(e + f*x))**p, x) + Integral((g*sec(e + f*x))**p*sec(e + f*x)**2, x))

________________________________________________________________________________________